/*
 * @Descripttion: $0
 * @version: 
 * @Author: linPing
 * @Date: 2019-10-29 01:26:12
 * @LastEditTime: 2019-11-02 11:07:30
 */
export default class NavigationUtil{
     /**
     * 跳转到指定页面
     * @param params 要传递的参数
     * @param page 要跳转的页面名
     **/
    static goPage(params,page){
        const navigation = this.navigation
        navigation.navigate(page,{...params})
    }

    static goBack(navigation){
        navigation.goBack()
    }

    /*
     *@Description: 导航跳转到首页
     *@param: {params}
     *@return: 
     *@Author:  zhengLinPing
    */
    static resetToHomePage(params){
        const {navigation} = params
        navigation.navigate("Main")
    }

    static goLoginPage(params){
        const {navigation} = params
        navigation.navigate("Login")
    }
}